#include "QtWidgetsForTest.h"
#include "person.h"

QtWidgetsForTest::QtWidgetsForTest() : QtWidgetsForTest(nullptr) {
}

QtWidgetsForTest::QtWidgetsForTest(QWidget *parent) : QMainWindow(parent) {
  ui.setupUi(this);
  const int age = 30;
  Person people("xiaoli", age);

  const QString msg =
      QString("%1 : %2").arg(people.name().c_str()).arg(QString::number(people.age()));

  ui.textEdit->append(msg);
}

QtWidgetsForTest::~QtWidgetsForTest() = default;